<template>
	<!--用户首次进入页面-->
	<view>
		<view class="mask"></view>
		<view class="model_box">
			<view class="mb-tit">用户协议和隐私政策</view>
			<view class="mb-content">
				<view class="mb-con">尊敬的用户您好！</view>
				<view class="mb-con">请您务必认真阅读、充分理解“用户协议”和“隐私政策”各条款，包括但不限于为了向您提供数据、分享、统计等服务所要获取的权限信息。</view>
				<view class="mb-con1">
					<navigator class="mb-a" url="./notice/userHide">《用户协议》</navigator>
					和
					<navigator class="mb-a" url="./notice/userService">《隐私政策》</navigator>
				</view>
				<text class="mb-con2">请您仔细阅读上方的的用户协议与隐私政策，请点击同意接受我们的服务</text>
			</view>
			<view class="checkbox">
				<!-- <view class="qx" bindtap="qx">取消</view> -->
				<view class="qr">
					<!-- <view style="font-size:22rpx;position:absolute;left:5%;display:flex;align-items:center;"><checkbox value="cb" checked="" bindtap="cb"/>勾选代表同意本协议的相关规定</view> -->
					<navigator class="noUse" target="miniProgram" open-type="exit">暂不使用</navigator>
					<view class="agree" @click="agree">同意</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
	  onLoad() {
	    var role = uni.getStorageSync('ROLE'); //获取
		console.log("role=" + role)
	    if (role == '1') {
	      //在tabBer里面
	      uni.switchTab({
	        url: '/pages/user/home/index'
	      });
	    } else if (role == '2') {
	      //不在tabBer里面
	      uni.redirectTo({
	        url: '/pages/business/mine/index'
	      });
	    }
	  },
	  methods: {
	    agree() {
	      uni. switchTab({
	        url: '/pages/user/home/index'
	      });
	    }
	  }
	};
</script>

<style>
	.mask {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		right: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 999;
	}
	.model_box {
		width: 80%;
		position: fixed;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		z-index: 1000;
		background: #fff;
		// height:48%;
		border-radius: 15rpx;
	}
	.mb-content {
		padding: 10rpx 20rpx 10rpx 25rpx;
		box-sizing: border-box;
		height: 80%;
		overflow: scroll;
	}
	.mb-tit {
		padding: 15rpx 0rpx;
		box-sizing: border-box;
		font-size: 34rpx;
		text-align: center;
	}

	.mb-con {
		font-size: 30rpx;
		text-indent: 2rem;
		line-height: 1.5;
	}

	.mb-con1 {
		font-size: 30rpx;
		text-indent: 2rem;
		display: flex;
	}
	.mb-con2 {
		font-size: 35rpx;
		text-indent: 2rem;
	}
	.mb-a {
			width: 180rpx;
			height: 40rpx;
			display: inline-block;
			padding: 0;
			margin: 0;
			color: #006df7;
			text-decoration: underline;
			text-indent: 0rem;
		}
	

	.checkbox {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 11%;
	}

	.checkbox .qx {
		width: 50%;
		text-align: center;
		border-right: 1rpx solid #efefef;
	}

	.qr {
		position: relative;
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		box-szing: border-box;
		font-size: 30rpx;
		padding: 0;
		padding-right: 30rpx;
		}
	.noUse {
			width: 50%;
			text-align: center;
			border-right: 1rpx solid #f3f3f3;
			color: #bbbbbb;
			padding-bottom: 15rpx;
		}

	.agree {
			width: 50%;
			text-align: center;
			font-size: 30rpx;
			color: #006df7;
			padding-bottom: 15rpx;
		}
	
</style>
